import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types';

const ComponentBackgroundMeta: IPublicTypeComponentMetadata = {
  componentName: 'ComponentBackground',
  title: '组件背景',
  docUrl: '',
  group: '首页',
  screenshot: '',
  devMode: 'proCode',
  npm: {
    package: 'hzdz-charts',
    version: '0.1.0',
    exportName: 'ComponentBackground',
    main: 'src/index.tsx',
    destructuring: true,
    subName: '',
  },
  configure: {
    props: [
      {
        name: 'width',
        title: { label: '宽度', tip: '组件宽度' },
        setter: 'NumberSetter',
        initialValue: 500,
      },
      {
        name: 'height',
        title: { label: '高度', tip: '组件高度' },
        setter: 'NumberSetter',
        initialValue: 352,
      },
      {
        name: 'opacity',
        title: { label: '透明度', tip: '背景透明度' },
        setter: 'NumberSetter',
        initialValue: 1,
      },
      {
        name: 'responsive',
        title: { label: '响应式', tip: '是否启用响应式' },
        setter: 'BoolSetter',
        initialValue: true,
      },
    ],
    supports: {
      style: true,
      className: true,
    },
    component: {
      isContainer: true,
    },
  },
};

const snippets: IPublicTypeSnippet[] = [
  {
    title: '组件背景',
    schema: {
      componentName: 'ComponentBackground',
      props: {
        width: 500,
        height: 352,
        opacity: 1,
        responsive: true,
      },
      children: [],
    },
  },
];

export default {
  ...ComponentBackgroundMeta,
  snippets,
}; 